#ifndef __LIB_AGORA_ADMIN_CHANNELMANAGER_H__
#define __LIB_AGORA_ADMIN_CHANNELMANAGER_H__

#include <list>
#include <string>
#include "IChannelManager.h"

class	ChannelManager : public IChannelManager
{
public:
	static IChannelManager*				GetChannelManager(void);
	const unsigned int					LoadChannel();
	IChannel*							CreateChannel(const std::string& name, const unsigned int maxNameLenght, const std::string& password, const unsigned int maxPasswordLenght, const std::string& motd, const unsigned int maxMotdLenght, const std::string& description, const unsigned int maxDescriptionLenght, const bool visible, const unsigned int maxUser, const unsigned int maxTalker);
	IChannel*							CreateChannel(IChannel* parent, const std::string& name, const unsigned int maxNameLenght, const std::string& password, const unsigned int maxPasswordLenght, const std::string& motd, const unsigned int maxMotdLenght, const std::string& description, const unsigned int maxDescriptionLenght, const bool visible, const unsigned int maxUser, const unsigned int maxTalker);
	void								DeleteChannel();
	//const unsigned int					DeleteChannel(IChannel* channel);
	const unsigned int					DeleteChannel(const unsigned int id);
	const unsigned int					DeleteChannel(IChannel*	channel);
	//const unsigned int					DeleteChannel(const std::string& pattern);
	const unsigned int					MoveChannel(IChannel* channel, IChannel* parent);
	const unsigned int					MoveChannel(IChannel* channel, const unsigned int idParent);
	const unsigned int					MoveChannel(IChannel* channel, const std::string& patternParent);
	const unsigned int					MoveChannel(const unsigned int idChannel, IChannel* parent);
	const unsigned int					MoveChannel(const unsigned int idChannel, const unsigned int idParent);
	const unsigned int					MoveChannel(const unsigned int idChannel, const std::string& patternParent);
	const unsigned int					MoveChannel(const std::string& patternChannel, IChannel* parent);
	const unsigned int					MoveChannel(const std::string& patternChannel, const unsigned int idParent);
	const unsigned int					MoveChannel(const std::string& patternChannel, const std::string& patternParent);
	IChannel*							GetChannel(const unsigned int id);
	IChannel*							GetChannel(const std::string& pattern);
	bool								ChannelExists(const unsigned int idParent, const std::string& name);
	std::list<IChannel*>&				GetChannelList();

private:
	ChannelManager();
	static IChannelManager*	_instance;
	std::list<IChannel*>	_channel;
	//std::list<IChannel*>	_mainChannel;
};

#endif